//
//  JTLoginRegisterTextField.m
//  百思不得姐
//
//  Created by Robin Zhang on 2016/12/19.
//  Copyright © 2016年 BeiJingWangDianJieTong. All rights reserved.
//

#import "JTLoginRegisterTextField.h"
#import <objc/runtime.h>

@interface JTLoginRegisterTextField ()

@end

@implementation JTLoginRegisterTextField

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    /* 设置光标颜色 */
    [self setTintColor:[UIColor whiteColor]];
    /* 设置默认的占位文字颜色 */
    [self setJt_placeholderColor:[UIColor grayColor]];
}

/**
 调用时刻：成为第一响应者(开始编辑\弹出键盘\获得焦点)
 */
- (BOOL)becomeFirstResponder {
    
    [self setJt_placeholderColor:[UIColor whiteColor]];
    return [super becomeFirstResponder];
}

/**
 调用时刻：放弃第一响应者(结束编辑\退出键盘\失去焦点)
 */
- (BOOL)resignFirstResponder {
    
    [self setJt_placeholderColor:[UIColor grayColor]];
    return [super resignFirstResponder];
}

@end
